<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>npyscreen.NMenuDisplay</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="npyscreen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="npyscreen-module.html">Package&nbsp;npyscreen</a> ::
        Module&nbsp;NMenuDisplay
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="npyscreen.NMenuDisplay-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="npyscreen.NMenuDisplay-module.html">Module npyscreen.NMenuDisplay</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># encoding: utf-8</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module npyscreen.NewMenu=npyscreen.NewMenu-module.html,Class npyscreen.NewMenu.NewMenu=npyscreen.NewMenu.NewMenu-class.html"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-0', 'NewMenu', 'link-0');">NewMenu</a></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module npyscreen.Form=npyscreen.Form-module.html,Class npyscreen.Form.Form=npyscreen.Form.Form-class.html"><a title="npyscreen.Form
npyscreen.Form.Form" class="py-name" href="#" onclick="return doclink('link-1', 'Form', 'link-1');">Form</a></tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module npyscreen.multiline=npyscreen.multiline-module.html"><a title="npyscreen.multiline" class="py-name" href="#" onclick="return doclink('link-2', 'multiline', 'link-2');">multiline</a></tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">weakref</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"> </tt>
<a name="MenuDisplay"></a><div id="MenuDisplay-def"><a name="L9"></a><tt class="py-lineno">  9</tt> <a class="py-toggle" href="#" id="MenuDisplay-toggle" onclick="return toggle('MenuDisplay');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html">MenuDisplay</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="MenuDisplay-expanded"><a name="MenuDisplay.__init__"></a><div id="MenuDisplay.__init__-def"><a name="L10"></a><tt class="py-lineno"> 10</tt> <a class="py-toggle" href="#" id="MenuDisplay.__init__-toggle" onclick="return toggle('MenuDisplay.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplay.__init__-expanded"><a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name" targets="Class npyscreen.NMenuDisplay.MenuDisplayScreen=npyscreen.NMenuDisplay.MenuDisplayScreen-class.html"><a title="npyscreen.NMenuDisplay.MenuDisplayScreen" class="py-name" href="#" onclick="return doclink('link-3', 'MenuDisplayScreen', 'link-3');">MenuDisplayScreen</a></tt><tt class="py-op">(</tt><tt class="py-name">lines</tt><tt class="py-op">=</tt><tt class="py-number">15</tt><tt class="py-op">,</tt> <tt class="py-name">columns</tt><tt class="py-op">=</tt><tt class="py-number">26</tt><tt class="py-op">,</tt> <tt class="py-name">show_atx</tt><tt class="py-op">=</tt><tt class="py-number">5</tt><tt class="py-op">,</tt> <tt class="py-name">show_aty</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method npyscreen.NMenuDisplay.MenuDisplay.setMenu()=npyscreen.NMenuDisplay.MenuDisplay-class.html#setMenu"><a title="npyscreen.NMenuDisplay.MenuDisplay.setMenu" class="py-name" href="#" onclick="return doclink('link-4', 'setMenu', 'link-4');">setMenu</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menuStack</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_editing</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="MenuDisplay.setMenu"></a><div id="MenuDisplay.setMenu-def"><a name="L16"></a><tt class="py-lineno"> 16</tt> <a class="py-toggle" href="#" id="MenuDisplay.setMenu-toggle" onclick="return toggle('MenuDisplay.setMenu');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html#setMenu">setMenu</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">mnu</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay.setMenu-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplay.setMenu-expanded"><a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menuStack</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method npyscreen.NMenuDisplay.MenuDisplay._setMenuWithoutResettingStack()=npyscreen.NMenuDisplay.MenuDisplay-class.html#_setMenuWithoutResettingStack"><a title="npyscreen.NMenuDisplay.MenuDisplay._setMenuWithoutResettingStack" class="py-name" href="#" onclick="return doclink('link-5', '_setMenuWithoutResettingStack', 'link-5');">_setMenuWithoutResettingStack</a></tt><tt class="py-op">(</tt><tt class="py-name">mnu</tt><tt class="py-op">)</tt> </tt>
</div><a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">     </tt>
<a name="MenuDisplay._setMenuWithoutResettingStack"></a><div id="MenuDisplay._setMenuWithoutResettingStack-def"><a name="L20"></a><tt class="py-lineno"> 20</tt> <a class="py-toggle" href="#" id="MenuDisplay._setMenuWithoutResettingStack-toggle" onclick="return toggle('MenuDisplay._setMenuWithoutResettingStack');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html#_setMenuWithoutResettingStack">_setMenuWithoutResettingStack</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">mnu</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay._setMenuWithoutResettingStack-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplay._setMenuWithoutResettingStack-expanded"><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menu</tt> <tt class="py-op">=</tt> <tt class="py-name">mnu</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt class="py-name">_menuListWidget</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Variable npyscreen.slider.Slider.value=npyscreen.slider.Slider-class.html#value,Variable npyscreen.titlefield.TitleText.value=npyscreen.titlefield.TitleText-class.html#value"><a title="npyscreen.slider.Slider.value
npyscreen.titlefield.TitleText.value" class="py-name" href="#" onclick="return doclink('link-6', 'value', 'link-6');">value</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mnu</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menu</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> </tt>
</div><a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">         </tt>
<a name="MenuDisplay._goToSubmenu"></a><div id="MenuDisplay._goToSubmenu-def"><a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="MenuDisplay._goToSubmenu-toggle" onclick="return toggle('MenuDisplay._goToSubmenu');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html#_goToSubmenu">_goToSubmenu</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">mnu</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay._goToSubmenu-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplay._goToSubmenu-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menuStack</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">mnu</tt><tt class="py-op">)</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menu</tt> <tt class="py-op">=</tt> <tt class="py-name">mnu</tt> </tt>
</div><a name="MenuDisplay._executeSelection"></a><div id="MenuDisplay._executeSelection-def"><a name="L29"></a><tt class="py-lineno"> 29</tt> <a class="py-toggle" href="#" id="MenuDisplay._executeSelection-toggle" onclick="return toggle('MenuDisplay._executeSelection');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html#_executeSelection">_executeSelection</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">sel</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay._executeSelection-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplay._executeSelection-expanded"><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_editing</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">sel</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">         </tt>
<a name="MenuDisplay.edit"></a><div id="MenuDisplay.edit-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="MenuDisplay.edit-toggle" onclick="return toggle('MenuDisplay.edit');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html#edit">edit</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay.edit-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplay.edit-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menu</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"No Menu Set"</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_editing</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_editing</tt><tt class="py-op">:</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method npyscreen.Form.Form.display()=npyscreen.Form.Form-class.html#display,Method npyscreen.widget.Widget.display()=npyscreen.widget.Widget-class.html#display"><a title="npyscreen.Form.Form.display
npyscreen.widget.Widget.display" class="py-name" href="#" onclick="return doclink('link-7', 'display', 'link-7');">display</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt class="py-name">_menuListWidget</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="npyscreen.slider.Slider.value
npyscreen.titlefield.TitleText.value" class="py-name" href="#" onclick="return doclink('link-8', 'value', 'link-6');">value</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt class="py-name">_menuListWidget</tt><tt class="py-op">.</tt><tt class="py-name">cursor_line</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt class="py-name">_menulines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">            <tt class="py-name">_actionsToTake</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menuStack</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">                <tt class="py-name">_menulines</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;-- Back'</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">                <tt class="py-name">_returnToPreviousSet</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">                <tt class="py-name">_actionsToTake</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method npyscreen.NMenuDisplay.MenuDisplay._returnToPrevious()=npyscreen.NMenuDisplay.MenuDisplay-class.html#_returnToPrevious"><a title="npyscreen.NMenuDisplay.MenuDisplay._returnToPrevious" class="py-name" href="#" onclick="return doclink('link-9', '_returnToPrevious', 'link-9');">_returnToPrevious</a></tt><tt class="py-op">,</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">                <tt class="py-name">_returnToPreviousSet</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">itm</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menu</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method npyscreen.NewMenu.NewMenu.getItemObjects()=npyscreen.NewMenu.NewMenu-class.html#getItemObjects"><a title="npyscreen.NewMenu.NewMenu.getItemObjects" class="py-name" href="#" onclick="return doclink('link-10', 'getItemObjects', 'link-10');">getItemObjects</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">itm</tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-11', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Class npyscreen.NewMenu.MenuItem=npyscreen.NewMenu.MenuItem-class.html"><a title="npyscreen.NewMenu.MenuItem" class="py-name" href="#" onclick="return doclink('link-12', 'MenuItem', 'link-12');">MenuItem</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">                    <tt class="py-name">_menulines</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">itm</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method npyscreen.NewMenu.MenuItem.getText()=npyscreen.NewMenu.MenuItem-class.html#getText"><a title="npyscreen.NewMenu.MenuItem.getText" class="py-name" href="#" onclick="return doclink('link-13', 'getText', 'link-13');">getText</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">                    <tt class="py-name">_actionsToTake</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method npyscreen.NMenuDisplay.MenuDisplay._executeSelection()=npyscreen.NMenuDisplay.MenuDisplay-class.html#_executeSelection"><a title="npyscreen.NMenuDisplay.MenuDisplay._executeSelection" class="py-name" href="#" onclick="return doclink('link-14', '_executeSelection', 'link-14');">_executeSelection</a></tt><tt class="py-op">,</tt> <tt class="py-name">itm</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method npyscreen.NewMenu.MenuItem.do()=npyscreen.NewMenu.MenuItem-class.html#do"><a title="npyscreen.NewMenu.MenuItem.do" class="py-name" href="#" onclick="return doclink('link-15', 'do', 'link-15');">do</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">itm</tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-16', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-17', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">                    <tt class="py-name">_menulines</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'%s --&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">itm</tt><tt class="py-op">.</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">                    <tt class="py-name">_actionsToTake</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method npyscreen.NMenuDisplay.MenuDisplay._goToSubmenu()=npyscreen.NMenuDisplay.MenuDisplay-class.html#_goToSubmenu"><a title="npyscreen.NMenuDisplay.MenuDisplay._goToSubmenu" class="py-name" href="#" onclick="return doclink('link-18', '_goToSubmenu', 'link-18');">_goToSubmenu</a></tt><tt class="py-op">,</tt> <tt class="py-name">itm</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"menu %s contains objects I don't know how to handle."</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menu</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">             </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt class="py-name">_menuListWidget</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Variable npyscreen.combobox.TitleCombo.values=npyscreen.combobox.TitleCombo-class.html#values,Variable npyscreen.multiline.TitleMultiLine.values=npyscreen.multiline.TitleMultiLine-class.html#values"><a title="npyscreen.combobox.TitleCombo.values
npyscreen.multiline.TitleMultiLine.values" class="py-name" href="#" onclick="return doclink('link-19', 'values', 'link-19');">values</a></tt> <tt class="py-op">=</tt> <tt class="py-name">_menulines</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="npyscreen.Form.Form.display
npyscreen.widget.Widget.display" class="py-name" href="#" onclick="return doclink('link-20', 'display', 'link-7');">display</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt class="py-name">_menuListWidget</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method npyscreen.ActionForm.ActionForm.edit()=npyscreen.ActionForm.ActionForm-class.html#edit,Method npyscreen.Form.Form.edit()=npyscreen.Form.Form-class.html#edit,Method npyscreen.Menu.Menu.edit()=npyscreen.Menu.Menu-class.html#edit,Method npyscreen.NMenuDisplay.MenuDisplay.edit()=npyscreen.NMenuDisplay.MenuDisplay-class.html#edit,Method npyscreen.combobox.ComboBox.edit()=npyscreen.combobox.ComboBox-class.html#edit,Method npyscreen.datecombo.DateCombo.edit()=npyscreen.datecombo.DateCombo-class.html#edit,Method npyscreen.multiline.MultiLine.edit()=npyscreen.multiline.MultiLine-class.html#edit,Method npyscreen.multiline.Pager.edit()=npyscreen.multiline.Pager-class.html#edit,Method npyscreen.textbox.FixedText.edit()=npyscreen.textbox.FixedText-class.html#edit,Method npyscreen.textbox.Textfield.edit()=npyscreen.textbox.Textfield-class.html#edit,Method npyscreen.titlefield.TitleText.edit()=npyscreen.titlefield.TitleText-class.html#edit,Method npyscreen.widget.Widget.edit()=npyscreen.widget.Widget-class.html#edit"><a title="npyscreen.ActionForm.ActionForm.edit
npyscreen.Form.Form.edit
npyscreen.Menu.Menu.edit
npyscreen.NMenuDisplay.MenuDisplay.edit
npyscreen.combobox.ComboBox.edit
npyscreen.datecombo.DateCombo.edit
npyscreen.multiline.MultiLine.edit
npyscreen.multiline.Pager.edit
npyscreen.textbox.FixedText.edit
npyscreen.textbox.Textfield.edit
npyscreen.titlefield.TitleText.edit
npyscreen.widget.Widget.edit" class="py-name" href="#" onclick="return doclink('link-21', 'edit', 'link-21');">edit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">            <tt class="py-name">_vlu</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_DisplayArea</tt><tt class="py-op">.</tt><tt class="py-name">_menuListWidget</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="npyscreen.slider.Slider.value
npyscreen.titlefield.TitleText.value" class="py-name" href="#" onclick="return doclink('link-22', 'value', 'link-6');">value</a></tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">_vlu</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">editing</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">                <tt class="py-name">_fctn</tt> <tt class="py-op">=</tt> <tt class="py-name">_actionsToTake</tt><tt class="py-op">[</tt><tt class="py-name">_vlu</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">                <tt class="py-name">_args</tt> <tt class="py-op">=</tt> <tt class="py-name">_actionsToTake</tt><tt class="py-op">[</tt><tt class="py-name">_vlu</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">IndexError</tt><tt class="py-op">:</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">                <tt class="py-name">_fctn</tt> <tt class="py-op">=</tt> <tt class="py-name">_actionsToTake</tt><tt class="py-op">[</tt><tt class="py-name">_vlu</tt><tt class="py-op">]</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">                <tt class="py-name">_args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">             </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">            <tt class="py-name">_return_value</tt> <tt class="py-op">=</tt> <tt class="py-name">_fctn</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">_args</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">         </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_return_value</tt> </tt>
</div><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">             </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">             </tt>
<a name="MenuDisplay._returnToPrevious"></a><div id="MenuDisplay._returnToPrevious-def"><a name="L78"></a><tt class="py-lineno"> 78</tt> <a class="py-toggle" href="#" id="MenuDisplay._returnToPrevious-toggle" onclick="return toggle('MenuDisplay._returnToPrevious');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplay-class.html#_returnToPrevious">_returnToPrevious</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplay._returnToPrevious-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplay._returnToPrevious-expanded"><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menu</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menuStack</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">         </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">     </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"> </tt>
<a name="MenuDisplayScreen"></a><div id="MenuDisplayScreen-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="MenuDisplayScreen-toggle" onclick="return toggle('MenuDisplayScreen');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplayScreen-class.html">MenuDisplayScreen</a><tt class="py-op">(</tt><tt class="py-base-class">Form</tt><tt class="py-op">.</tt><tt class="py-base-class">Form</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplayScreen-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="MenuDisplayScreen-expanded"><a name="MenuDisplayScreen.create"></a><div id="MenuDisplayScreen.create-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="MenuDisplayScreen.create-toggle" onclick="return toggle('MenuDisplayScreen.create');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.MenuDisplayScreen-class.html#create">create</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MenuDisplayScreen.create-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MenuDisplayScreen.create-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_menuListWidget</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt id="link-23" class="py-name"><a title="npyscreen.multiline" class="py-name" href="#" onclick="return doclink('link-23', 'multiline', 'link-2');">multiline</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Class npyscreen.multiline.MultiLine=npyscreen.multiline.MultiLine-class.html"><a title="npyscreen.multiline.MultiLine" class="py-name" href="#" onclick="return doclink('link-24', 'MultiLine', 'link-24');">MultiLine</a></tt><tt class="py-op">,</tt> <tt class="py-name">return_exit</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"> </tt>
<a name="HasMenus"></a><div id="HasMenus-def"><a name="L87"></a><tt class="py-lineno"> 87</tt> <a class="py-toggle" href="#" id="HasMenus-toggle" onclick="return toggle('HasMenus');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.HasMenus-class.html">HasMenus</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HasMenus-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="HasMenus-expanded"><a name="HasMenus.initialize_menus"></a><div id="HasMenus.initialize_menus-def"><a name="L88"></a><tt class="py-lineno"> 88</tt> <a class="py-toggle" href="#" id="HasMenus.initialize_menus-toggle" onclick="return toggle('HasMenus.initialize_menus');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.HasMenus-class.html#initialize_menus">initialize_menus</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HasMenus.initialize_menus-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HasMenus.initialize_menus-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_NMDisplay</tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name" targets="Class npyscreen.NMenuDisplay.MenuDisplay=npyscreen.NMenuDisplay.MenuDisplay-class.html"><a title="npyscreen.NMenuDisplay.MenuDisplay" class="py-name" href="#" onclick="return doclink('link-25', 'MenuDisplay', 'link-25');">MenuDisplay</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_NMenuList</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_MainMenu</tt>  <tt class="py-op">=</tt> <tt id="link-26" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-26', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-27', 'NewMenu', 'link-0');">NewMenu</a></tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method npyscreen.widget.InputHandler.add_handlers()=npyscreen.widget.InputHandler-class.html#add_handlers"><a title="npyscreen.widget.InputHandler.add_handlers" class="py-name" href="#" onclick="return doclink('link-28', 'add_handlers', 'link-28');">add_handlers</a></tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-string">'^X'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method npyscreen.NMenuDisplay.HasMenus.root_menu()=npyscreen.NMenuDisplay.HasMenus-class.html#root_menu"><a title="npyscreen.NMenuDisplay.HasMenus.root_menu" class="py-name" href="#" onclick="return doclink('link-29', 'root_menu', 'link-29');">root_menu</a></tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
</div><a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">         </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">         </tt>
<a name="HasMenus.new_menu"></a><div id="HasMenus.new_menu-def"><a name="L95"></a><tt class="py-lineno"> 95</tt> <a class="py-toggle" href="#" id="HasMenus.new_menu-toggle" onclick="return toggle('HasMenus.new_menu');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.HasMenus-class.html#new_menu">new_menu</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HasMenus.new_menu-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HasMenus.new_menu-expanded"><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-name">_mnu</tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-30', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-31', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">=</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_NMenuList</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">_mnu</tt><tt class="py-op">)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">weakref</tt><tt class="py-op">.</tt><tt class="py-name">proxy</tt><tt class="py-op">(</tt><tt class="py-name">_mnu</tt><tt class="py-op">)</tt> </tt>
</div><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">         </tt>
<a name="HasMenus.root_menu"></a><div id="HasMenus.root_menu-def"><a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="HasMenus.root_menu-toggle" onclick="return toggle('HasMenus.root_menu');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.HasMenus-class.html#root_menu">root_menu</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HasMenus.root_menu-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HasMenus.root_menu-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-name">_root_menu</tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-32', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-33', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">=</tt><tt class="py-string">"Menus"</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">mnu</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_NMenuList</tt><tt class="py-op">:</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">            <tt class="py-name">_root_menu</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Method npyscreen.NewMenu.NewMenu.addSubmenu()=npyscreen.NewMenu.NewMenu-class.html#addSubmenu"><a title="npyscreen.NewMenu.NewMenu.addSubmenu" class="py-name" href="#" onclick="return doclink('link-34', 'addSubmenu', 'link-34');">addSubmenu</a></tt><tt class="py-op">(</tt><tt class="py-name">mnu</tt><tt class="py-op">)</tt>             </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_NMDisplay</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="npyscreen.NMenuDisplay.MenuDisplay.setMenu" class="py-name" href="#" onclick="return doclink('link-35', 'setMenu', 'link-4');">setMenu</a></tt><tt class="py-op">(</tt><tt class="py-name">_root_menu</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_NMDisplay</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="npyscreen.ActionForm.ActionForm.edit
npyscreen.Form.Form.edit
npyscreen.Menu.Menu.edit
npyscreen.NMenuDisplay.MenuDisplay.edit
npyscreen.combobox.ComboBox.edit
npyscreen.datecombo.DateCombo.edit
npyscreen.multiline.MultiLine.edit
npyscreen.multiline.Pager.edit
npyscreen.textbox.FixedText.edit
npyscreen.textbox.Textfield.edit
npyscreen.titlefield.TitleText.edit
npyscreen.widget.Widget.edit" class="py-name" href="#" onclick="return doclink('link-36', 'edit', 'link-21');">edit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">         </tt>
<a name="HasMenus.popup_menu"></a><div id="HasMenus.popup_menu-def"><a name="L107"></a><tt class="py-lineno">107</tt> <a class="py-toggle" href="#" id="HasMenus.popup_menu-toggle" onclick="return toggle('HasMenus.popup_menu');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay.HasMenus-class.html#popup_menu">popup_menu</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">menu</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HasMenus.popup_menu-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HasMenus.popup_menu-expanded"><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="npyscreen.NMenuDisplay.MenuDisplay.setMenu" class="py-name" href="#" onclick="return doclink('link-37', 'setMenu', 'link-4');">setMenu</a></tt><tt class="py-op">(</tt><tt class="py-name">menu</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="npyscreen.ActionForm.ActionForm.edit
npyscreen.Form.Form.edit
npyscreen.Menu.Menu.edit
npyscreen.NMenuDisplay.MenuDisplay.edit
npyscreen.combobox.ComboBox.edit
npyscreen.datecombo.DateCombo.edit
npyscreen.multiline.MultiLine.edit
npyscreen.multiline.Pager.edit
npyscreen.textbox.FixedText.edit
npyscreen.textbox.Textfield.edit
npyscreen.titlefield.TitleText.edit
npyscreen.widget.Widget.edit" class="py-name" href="#" onclick="return doclink('link-38', 'edit', 'link-21');">edit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">         </tt>
<a name="main"></a><div id="main-def"><a name="L114"></a><tt class="py-lineno">114</tt> <a class="py-toggle" href="#" id="main-toggle" onclick="return toggle('main');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="npyscreen.NMenuDisplay-module.html#main">main</a><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="main-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="main-expanded"><a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">setq1</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-keyword">global</tt> <tt class="py-name">q</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
</div><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">beep</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-name">curses</tt><tt class="py-op">.</tt><tt class="py-name">beep</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">    <tt class="py-keyword">def</tt> <tt class="py-def-name">doNothing</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">    <tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt>    </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">    <tt class="py-name">M1</tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-39', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="npyscreen.NewMenu
npyscreen.NewMenu.NewMenu" class="py-name" href="#" onclick="return doclink('link-40', 'NewMenu', 'link-0');">NewMenu</a></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">=</tt><tt class="py-string">'Menu1'</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">    <tt class="py-name">M1</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method npyscreen.NewMenu.NewMenu.addItem()=npyscreen.NewMenu.NewMenu-class.html#addItem"><a title="npyscreen.NewMenu.NewMenu.addItem" class="py-name" href="#" onclick="return doclink('link-41', 'addItem', 'link-41');">addItem</a></tt><tt class="py-op">(</tt><tt class="py-string">'Beep'</tt><tt class="py-op">,</tt> <tt class="py-name">beep</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-name">M1</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="npyscreen.NewMenu.NewMenu.addItem" class="py-name" href="#" onclick="return doclink('link-42', 'addItem', 'link-41');">addItem</a></tt><tt class="py-op">(</tt><tt class="py-string">'Nothing'</tt><tt class="py-op">,</tt> <tt class="py-name">doNothing</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">    <tt class="py-name">M1</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="npyscreen.NewMenu.NewMenu.addSubmenu" class="py-name" href="#" onclick="return doclink('link-43', 'addSubmenu', 'link-34');">addSubmenu</a></tt><tt class="py-op">(</tt><tt class="py-name">M1</tt><tt class="py-op">)</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">     </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">    <tt class="py-name">MenuDisplay1</tt> <tt class="py-op">=</tt> <tt id="link-44" class="py-name"><a title="npyscreen.NMenuDisplay.MenuDisplay" class="py-name" href="#" onclick="return doclink('link-44', 'MenuDisplay', 'link-25');">MenuDisplay</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">    <tt class="py-name">MenuDisplay1</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="npyscreen.NMenuDisplay.MenuDisplay.setMenu" class="py-name" href="#" onclick="return doclink('link-45', 'setMenu', 'link-4');">setMenu</a></tt><tt class="py-op">(</tt><tt class="py-name">M1</tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">    <tt class="py-name">MenuDisplay1</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="npyscreen.ActionForm.ActionForm.edit
npyscreen.Form.Form.edit
npyscreen.Menu.Menu.edit
npyscreen.NMenuDisplay.MenuDisplay.edit
npyscreen.combobox.ComboBox.edit
npyscreen.datecombo.DateCombo.edit
npyscreen.multiline.MultiLine.edit
npyscreen.multiline.Pager.edit
npyscreen.textbox.FixedText.edit
npyscreen.textbox.Textfield.edit
npyscreen.titlefield.TitleText.edit
npyscreen.widget.Widget.edit" class="py-name" href="#" onclick="return doclink('link-46', 'edit', 'link-21');">edit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">q</tt> </tt>
</div><a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line"> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">curses</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">    <tt class="py-name">q</tt> <tt class="py-op">=</tt> <tt class="py-name">curses</tt><tt class="py-op">.</tt><tt class="py-name">wrapper</tt><tt class="py-op">(</tt><tt id="link-47" class="py-name" targets="Function npyscreen.NMenuDisplay.main()=npyscreen.NMenuDisplay-module.html#main,Method npyscreen.NPSApp.NPSApp.main()=npyscreen.NPSApp.NPSApp-class.html#main,Method npyscreen.NPSAppManaged.NPSAppManaged.main()=npyscreen.NPSAppManaged.NPSAppManaged-class.html#main"><a title="npyscreen.NMenuDisplay.main
npyscreen.NPSApp.NPSApp.main
npyscreen.NPSAppManaged.NPSAppManaged.main" class="py-name" href="#" onclick="return doclink('link-47', 'main', 'link-47');">main</a></tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-name">q</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">"Now I am the Master"</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="npyscreen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Mar 29 15:58:56 2007
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
